﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TempleMod.aspx.cs" Inherits="TempleMod" ValidateRequest="false" %>

<!DOCTYPE html>
<html>
<head>
   <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>50CMS后台框架</title>
    <link rel="shortcut icon" href="favicon.ico">
     <link href="../css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="../css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="../css/animate.css" rel="stylesheet">
    <link href="../css/style.css?v=4.1.0" rel="stylesheet">

        <link href="../50/style.css" rel="stylesheet" />
        <script src="Prototype.js"></script>
    <script src="public.js"></script>
</head>
<body class="gray-bg">
<form id="form1" runat="server" class="form-horizontal m-t">
  <div class="wrapper animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
            
                    <div class="ibox-content">
                       <div class="panel-body">
                      <div class="form-group">


                         <div class="col-sm-12" style="margin-top: 1em;">
                            <label class="col-sm-2 control-label">修改模板文件：</label>
                            <div class="col-sm-6">
                                  <asp:Label ID="Labelname" runat="server" Text=""></asp:Label>
                            </div>
                        </div>

                         <div class="col-sm-12" style="margin-top: 1em;">
                            <label class="col-sm-2 control-label">Read页面标签：</label>
                            <div class="col-sm-6">
                         

        <asp:DropDownList ID="LabelList1" runat="server" style="padding:5px 3px; height:35px;">
        <asp:ListItem Value="">=Read页面标签=</asp:ListItem>
        <asp:ListItem Value="<!--Read_title-->">页面标题</asp:ListItem> 
        <asp:ListItem Value="<!--Read_auth-->">作者</asp:ListItem>  
        <asp:ListItem Value="<!--Read_content-->">页面内容</asp:ListItem>
        <asp:ListItem Value="<!--Read_time-->">发布时间 </asp:ListItem>
        <asp:ListItem Value="<!--Read_from-->">来源</asp:ListItem>  
        <asp:ListItem Value="<!--Read_click-->">点击数</asp:ListItem>  
        <asp:ListItem Value="<!--Read_key-->">meta关键字KEY</asp:ListItem>
        <asp:ListItem Value="<!--Read_desc-->">meta描述</asp:ListItem>
        <asp:ListItem Value="{--LnFeedBack*N,all,2--}">留言评论标签</asp:ListItem>
        </asp:DropDownList>

 <input id="Button1" class="submit btn btn-warning" type="button" value="插入" onclick="javascript:getValue(document.getElementById('LabelList1').value);" />

                            </div>
                        </div>
                          
                         <div class="col-sm-12" style="margin-top: 1em;">
                            <label class="col-sm-2 control-label" >频道标签：</label>
                            <div class="col-sm-6" id="adress">



                                <a onclick="EditTempleTag(1)" class="btn btn-warning">内容列表标签生成</a>
 
                            </div>
                        </div>  
                                                                            

                         <div class="col-sm-12" style="margin-top: 1em;">
                            <label class="col-sm-2 control-label">频道其他标签：</label>
                            <div class="col-sm-6">
              <asp:DropDownList ID="LabelList2" runat="server" style="padding:5px 3px; height:35px;">
        <asp:ListItem Value="">=其他频道标签=</asp:ListItem>
        <asp:ListItem Value="{--LnTag*1--}">频道自定义标签一</asp:ListItem> 
        <asp:ListItem Value="{--LnTag*2--}">频道自定义标签二</asp:ListItem>  
        <asp:ListItem Value="{--LnTag*3--}">频道自定义标签三</asp:ListItem>
        <asp:ListItem Value="{--LnClassList*1--}">带链接栏目列表标签</asp:ListItem>
        <asp:ListItem Value="{--LnClassList*2--}">带链接栏目列表标签同级</asp:ListItem>
        <asp:ListItem Value="{--LnClassList*3--}">带链接栏目列表标签下级</asp:ListItem>
        <asp:ListItem Value="{--LnClassNav*1--}">带链接栏目导航</asp:ListItem>
        <asp:ListItem Value="{--LnClassNav*0--}">不带链接栏目导航</asp:ListItem>
        <asp:ListItem Value="{--LnClassName*1--}">带链接栏目名称</asp:ListItem>
        <asp:ListItem Value="{--LnClassName*0--}">不带链接栏目名称</asp:ListItem>
        
          
        </asp:DropDownList>  
  <input id="Button2" class="submit btn btn-warning" type="button" value="插入" onclick="javascript:getValue(document.getElementById('LabelList2').value);" />
                            </div>
                        </div>


                         <div class="col-sm-12" style="margin-top: 1em;">
                            <label class="col-sm-2 control-label">全站通用自定义标签：</label>
                            <div class="col-sm-6">
                                 <asp:DropDownList ID="DDzdy" runat="server" style="padding:5px 3px; height:35px;">

        </asp:DropDownList>
        
   <input id="Button2" class="submit btn btn-warning" type="button" value="插入" onclick="javascript:getValue(document.getElementById('DDzdy').value);" />
                            </div>
                        </div>



                         <div class="col-sm-12" style="margin-top: 1em;">
                           
                            <div class="col-sm-12">
           <asp:TextBox ID="Content" runat="server"  CssClass="input w250 required"  TextMode="MultiLine" Height="300px" 
              Width="90%"
           ></asp:TextBox>
                            
                            </div>
                        </div>

                      <div class="form-group" style="margin-top: 2em;">
                            <div class="col-sm-8 col-sm-offset-3" style="margin-top: 2em;">
                                  <asp:Button ID="btnSave" runat="server" Text="确认保存" CssClass="btn btn-primary" onclick="Button1_Click" />
  &nbsp;
  <input type="button" class="btn btn-primary" id="btnCancel" value="取消" onclick="javascript:UnDo();" />

                            </div>
                        </div>




                             </div>
                        </div>
                    </div>
                </div>
            </div>
       
    </div>
        </form>

    
      <!-- 全局js -->
    <script src="../js/jquery.min.js?v=2.1.4"></script>
    <script src="../js/bootstrap.min.js?v=3.3.6"></script>

      <!-- 自定js -->
    <script language="javascript" type="text/javascript">

    function UnDo() {
        if (confirm('你确定要取消所做的更改吗?')) {
            document.getElementById('fromeditor').reset();
        }
    }
    function getValue(value) {
        if (value != "")
            insert(value);
    }
</script>
    <script type="text/javascript" src="../js/layer/layer.js"></script>
    <script type="text/javascript">


     function ReturnLayerValueText(value)
{
    try
    {
//        //IDContent.insertHTML(value)
//        IDContentTextBox.insertHTML(value);
        if(value!="")
        {
            var oEditor = FCKeditorAPI.GetInstance("Content");
            if (oEditor.EditMode==FCK_EDITMODE_WYSIWYG)
            {
               oEditor.InsertHtml(value);
            }else
            {
            return false;
            }
        }
    }
    catch(e)
    {
        insert(value);
    }
    finally
    {
         layer.closeAll();

        layer.msg('成功插入了 生成的标签');
        
        return;
    }
}

      
                if (typeof (Close) != "undefined") {
                layer.msg('保存成功，正在返回', {
                time: 2000, //20s后自动关闭 
                },function()
                {
                var index = parent.layer.getFrameIndex(window.name); //获取当前窗体索引
                parent.layer.close(index); //执行关闭
                });       
                }
    


        function EditTempleTag(ID)
       {
           layer.open({
               type: 2,
               title: '修改分类',
               shadeClose: true,
               shade: 0.8,
               area: ['60%', '80%'],
               content: 'Templeadd.aspx',  //iframe的url
               end: function () {
               }
           });
       }
    </script>
 
</body>
</html>

